mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Started the real code on the Qt Interface.
1 - Open File already open files, it tries to not break the Gtk version, but some methods on the GTK version still need to be called inside Qt because the code is too tight-coupled. 2 - Close file already close files, same comments for the open file dialog applies here. 3 - The code for adding new cylinders in the cylinder dialog is done, already works and it's integrated with the system. There's a need to implement the edit and delete now, but it will be easyer since I'm starting to not get lost on the code. 4 - Some functions that were used to convert unities have been moved to convert.h ( can be changed later, put there because it's easyer to find something that converts in a convert.h =p ) because they were static functions that operated in the GTK version but I need those functions in the Qt version too. [Dirk Hohndel: lots and lots of whitespace and coding style changes] Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
76f71b4ca0
commit
92397a2bad
14 changed files with 823 additions and 14 deletions
|
@ -126,6 +126,7 @@ static void on_info_bar_response(GtkWidget *widget, gint response,
|
|||
|
||||
void report_error(GError* error)
|
||||
{
|
||||
qDebug("Warning: Calling GTK-Specific Code.");
|
||||
if (error == NULL)
|
||||
{
|
||||
return;
|
||||
|
@ -253,6 +254,8 @@ static void file_save(GtkWidget *w, gpointer data)
|
|||
|
||||
static gboolean ask_save_changes()
|
||||
{
|
||||
//WARNING: Porting to Qt
|
||||
qDebug("This method is being ported to Qt, please, stop using it. ");
|
||||
GtkWidget *dialog, *label, *content;
|
||||
gboolean quit = TRUE;
|
||||
dialog = gtk_dialog_new_with_buttons(_("Save Changes?"),
|
||||
|
@ -291,6 +294,7 @@ static gboolean ask_save_changes()
|
|||
|
||||
static void file_close(GtkWidget *w, gpointer data)
|
||||
{
|
||||
qDebug("Calling an already ported-to-qt Gtk method");
|
||||
if (unsaved_changes())
|
||||
if (ask_save_changes() == FALSE)
|
||||
return;
|
||||
|
@ -319,8 +323,12 @@ static void file_close(GtkWidget *w, gpointer data)
|
|||
show_dive_info(NULL);
|
||||
}
|
||||
|
||||
//#####################################################################
|
||||
//###### ALREAADY PORTED TO Qt. DELETE ME WHEN NOT MORE USERFUL. #
|
||||
//#####################################################################
|
||||
static void file_open(GtkWidget *w, gpointer data)
|
||||
{
|
||||
qDebug("Calling an already ported-to-qt Gtk method.");
|
||||
GtkWidget *dialog;
|
||||
GtkFileFilter *filter;
|
||||
const char *current_default;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue