gnome-commander r1931 - in trunk: . src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r1931 - in trunk: . src
- Date: Fri, 1 Aug 2008 20:32:55 +0000 (UTC)
Author: epiotr
Date: Fri Aug 1 20:32:55 2008
New Revision: 1931
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1931&view=rev
Log:
Convert GnomeCmdOptionsDialog struct to C++ class
Modified:
trunk/ChangeLog
trunk/src/gnome-cmd-con.h
trunk/src/gnome-cmd-dir.cc
trunk/src/gnome-cmd-options-dialog.cc
trunk/src/gnome-cmd-options-dialog.h
Modified: trunk/src/gnome-cmd-con.h
==============================================================================
--- trunk/src/gnome-cmd-con.h (original)
+++ trunk/src/gnome-cmd-con.h Fri Aug 1 20:32:55 2008
@@ -36,7 +36,6 @@
#include "gnome-cmd-path.h"
#include "gnome-cmd-dir.h"
-#include "gnome-cmd-dir-pool.h"
#include "gnome-cmd-pixmap.h"
#include "gnome-cmd-data.h"
#include "history.h"
Modified: trunk/src/gnome-cmd-dir.cc
==============================================================================
--- trunk/src/gnome-cmd-dir.cc (original)
+++ trunk/src/gnome-cmd-dir.cc Fri Aug 1 20:32:55 2008
@@ -21,7 +21,6 @@
#include "gnome-cmd-includes.h"
#include "gnome-cmd-dir.h"
#include "gnome-cmd-file.h"
-#include "gnome-cmd-dir-pool.h"
#include "gnome-cmd-main-win.h"
#include "gnome-cmd-con-smb.h"
#include "gnome-cmd-data.h"
Modified: trunk/src/gnome-cmd-options-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-options-dialog.cc (original)
+++ trunk/src/gnome-cmd-options-dialog.cc Fri Aug 1 20:32:55 2008
@@ -34,7 +34,7 @@
static GnomeCmdDialogClass *parent_class = NULL;
-struct _GnomeCmdOptionsDialogPrivate
+struct GnomeCmdOptionsDialog::Private
{
};
@@ -1764,10 +1764,9 @@
static void init (GnomeCmdOptionsDialog *dialog)
{
- GtkWidget *options_dialog;
+ GtkWidget *options_dialog = GTK_WIDGET (dialog);
- dialog->priv = g_new (GnomeCmdOptionsDialogPrivate, 1);
- options_dialog = GTK_WIDGET (dialog);
+ dialog->priv = g_new0 (GnomeCmdOptionsDialog::Private, 1);
gtk_object_set_data (GTK_OBJECT (options_dialog), "options_dialog", options_dialog);
gtk_window_set_position (GTK_WINDOW (options_dialog), GTK_WIN_POS_CENTER);
@@ -1791,42 +1790,42 @@
gtk_notebook_set_tab_label (
GTK_NOTEBOOK (dialog->notebook),
- gtk_notebook_get_nth_page (GTK_NOTEBOOK (dialog->notebook), GNOME_CMD_OPTIONS_DIALOG_TAB_GENERAL),
+ gtk_notebook_get_nth_page (GTK_NOTEBOOK (dialog->notebook), GnomeCmdOptionsDialog::TAB_GENERAL),
gtk_label_new (_("General")));
gtk_notebook_set_tab_label (
GTK_NOTEBOOK (dialog->notebook),
- gtk_notebook_get_nth_page (GTK_NOTEBOOK (dialog->notebook), GNOME_CMD_OPTIONS_DIALOG_TAB_FORMAT),
+ gtk_notebook_get_nth_page (GTK_NOTEBOOK (dialog->notebook), GnomeCmdOptionsDialog::TAB_FORMAT),
gtk_label_new (_("Format")));
gtk_notebook_set_tab_label (
GTK_NOTEBOOK (dialog->notebook),
- gtk_notebook_get_nth_page (GTK_NOTEBOOK (dialog->notebook), GNOME_CMD_OPTIONS_DIALOG_TAB_LAYOUT),
+ gtk_notebook_get_nth_page (GTK_NOTEBOOK (dialog->notebook), GnomeCmdOptionsDialog::TAB_LAYOUT),
gtk_label_new (_("Layout")));
gtk_notebook_set_tab_label (
GTK_NOTEBOOK (dialog->notebook),
- gtk_notebook_get_nth_page (GTK_NOTEBOOK (dialog->notebook), GNOME_CMD_OPTIONS_DIALOG_TAB_CONFIRMATION),
+ gtk_notebook_get_nth_page (GTK_NOTEBOOK (dialog->notebook), GnomeCmdOptionsDialog::TAB_CONFIRMATION),
gtk_label_new (_("Confirmation")));
gtk_notebook_set_tab_label (
GTK_NOTEBOOK (dialog->notebook),
- gtk_notebook_get_nth_page (GTK_NOTEBOOK (dialog->notebook), GNOME_CMD_OPTIONS_DIALOG_TAB_FILTERS),
+ gtk_notebook_get_nth_page (GTK_NOTEBOOK (dialog->notebook), GnomeCmdOptionsDialog::TAB_FILTERS),
gtk_label_new (_("Filters")));
gtk_notebook_set_tab_label (
GTK_NOTEBOOK (dialog->notebook),
- gtk_notebook_get_nth_page (GTK_NOTEBOOK (dialog->notebook), GNOME_CMD_OPTIONS_DIALOG_TAB_NETWORK),
+ gtk_notebook_get_nth_page (GTK_NOTEBOOK (dialog->notebook), GnomeCmdOptionsDialog::TAB_NETWORK),
gtk_label_new (_("Network")));
gtk_notebook_set_tab_label (
GTK_NOTEBOOK (dialog->notebook),
- gtk_notebook_get_nth_page (GTK_NOTEBOOK (dialog->notebook), GNOME_CMD_OPTIONS_DIALOG_TAB_PROGRAMS),
+ gtk_notebook_get_nth_page (GTK_NOTEBOOK (dialog->notebook), GnomeCmdOptionsDialog::TAB_PROGRAMS),
gtk_label_new (_("Programs")));
gtk_notebook_set_tab_label (
GTK_NOTEBOOK (dialog->notebook),
- gtk_notebook_get_nth_page (GTK_NOTEBOOK (dialog->notebook), GNOME_CMD_OPTIONS_DIALOG_TAB_DEVICES),
+ gtk_notebook_get_nth_page (GTK_NOTEBOOK (dialog->notebook), GnomeCmdOptionsDialog::TAB_DEVICES),
gtk_label_new (_("Devices")));
@@ -1869,9 +1868,3 @@
{
return (GtkWidget *) gtk_type_new (gnome_cmd_options_dialog_get_type ());
}
-
-
-void gnome_cmd_options_dialog_set_tab (GnomeCmdOptionsDialog *dialog, GnomeCmdOptionsDialogTab tab)
-{
- gtk_notebook_set_page (GTK_NOTEBOOK (dialog->notebook), tab);
-}
Modified: trunk/src/gnome-cmd-options-dialog.h
==============================================================================
--- trunk/src/gnome-cmd-options-dialog.h (original)
+++ trunk/src/gnome-cmd-options-dialog.h Fri Aug 1 20:32:55 2008
@@ -19,56 +19,44 @@
#ifndef __GNOME_CMD_OPTIONS_DIALOG_H__
#define __GNOME_CMD_OPTIONS_DIALOG_H__
-#define GNOME_CMD_OPTIONS_DIALOG(obj) \
- GTK_CHECK_CAST (obj, gnome_cmd_options_dialog_get_type (), GnomeCmdOptionsDialog)
-#define GNOME_CMD_OPTIONS_DIALOG_CLASS(klass) \
- GTK_CHECK_CLASS_CAST (klass, gnome_cmd_options_dialog_get_type (), GnomeCmdOptionsDialogClass)
-#define GNOME_CMD_IS_OPTIONS_DIALOG(obj) \
- GTK_CHECK_TYPE (obj, gnome_cmd_options_dialog_get_type ())
+#define GNOME_CMD_OPTIONS_DIALOG(obj) GTK_CHECK_CAST (obj, gnome_cmd_options_dialog_get_type (), GnomeCmdOptionsDialog)
+#define GNOME_CMD_OPTIONS_DIALOG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gnome_cmd_options_dialog_get_type (), GnomeCmdOptionsDialogClass)
+#define GNOME_CMD_IS_OPTIONS_DIALOG(obj) GTK_CHECK_TYPE (obj, gnome_cmd_options_dialog_get_type ())
-typedef struct _GnomeCmdOptionsDialog GnomeCmdOptionsDialog;
-typedef struct _GnomeCmdOptionsDialogPrivate GnomeCmdOptionsDialogPrivate;
-typedef struct _GnomeCmdOptionsDialogClass GnomeCmdOptionsDialogClass;
-
-
-typedef enum
+struct GnomeCmdOptionsDialogClass
{
- GNOME_CMD_OPTIONS_DIALOG_TAB_GENERAL,
- GNOME_CMD_OPTIONS_DIALOG_TAB_FORMAT,
- GNOME_CMD_OPTIONS_DIALOG_TAB_LAYOUT,
- GNOME_CMD_OPTIONS_DIALOG_TAB_CONFIRMATION,
- GNOME_CMD_OPTIONS_DIALOG_TAB_FILTERS,
- GNOME_CMD_OPTIONS_DIALOG_TAB_NETWORK,
- GNOME_CMD_OPTIONS_DIALOG_TAB_PROGRAMS,
- GNOME_CMD_OPTIONS_DIALOG_TAB_DEVICES
-} GnomeCmdOptionsDialogTab;
+ GnomeCmdDialogClass parent_class;
+};
-struct _GnomeCmdOptionsDialog
+struct GnomeCmdOptionsDialog
{
GnomeCmdDialog parent;
- GtkWidget *notebook;
-
- GnomeCmdOptionsDialogPrivate *priv;
-};
+ struct Private;
+ Private *priv;
-struct _GnomeCmdOptionsDialogClass
-{
- GnomeCmdDialogClass parent_class;
-};
+ enum Tab
+ {
+ TAB_GENERAL,
+ TAB_FORMAT,
+ TAB_LAYOUT,
+ TAB_CONFIRMATION,
+ TAB_FILTERS,
+ TAB_NETWORK,
+ TAB_PROGRAMS,
+ TAB_DEVICES
+ } ;
+ GtkWidget *notebook;
-GtkType
-gnome_cmd_options_dialog_get_type (void);
+ void set_tab (Tab tab) { gtk_notebook_set_page (GTK_NOTEBOOK (notebook), tab); }
+};
-GtkWidget*
-gnome_cmd_options_dialog_new (void);
-void
-gnome_cmd_options_dialog_set_tab (GnomeCmdOptionsDialog *dialog,
- GnomeCmdOptionsDialogTab tab);
+GtkType gnome_cmd_options_dialog_get_type (void);
+GtkWidget *gnome_cmd_options_dialog_new (void);
#endif // __GNOME_CMD_OPTIONS_DIALOG_H__
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]