Changeset 25

Show
Ignore:
Timestamp:
11/01/07 13:25:30
Author:
pvanhoof
Message:
        • Further refactoring
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r22 r25  
    33        * Restructured the menus a little bit 
    44        * Implementation of copy&move and delete of folders 
     5        * Further refactoring 
    56 
    672007-10-31  Philip Van Hoof  <pvanhoof@gnome.org> 
  • trunk/src/tmut-menu-view.c

    r24 r25  
    148148                                &store, -1); 
    149149                        dialog = gtk_dialog_new_with_buttons ("Create a folder", 
    150                                         GTK_WINDOW (gtk_widget_get_parent (GTK_WIDGET (self))), 
     150                                        GTK_WINDOW (priv->shell), 
    151151                                        GTK_DIALOG_MODAL, 
    152152                                        GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, 
     
    215215                                gint result; 
    216216                                GtkWidget *dialog = gtk_dialog_new_with_buttons ("Delete a folder", 
    217                                           GTK_WINDOW (gtk_widget_get_parent (GTK_WIDGET (self))), 
     217                                          GTK_WINDOW (priv->shell), 
    218218                                          GTK_DIALOG_MODAL, 
    219219                                          GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, 
  • trunk/src/tmut-shell-window.c

    r19 r25  
    4444 
    4545 
    46 void  
    47 tmut_shell_window_set_child (TMutShellWindow *self, TMutShellChild *child, const gchar *instruction) 
    48 { 
    49         TMUT_SHELL_WINDOW_GET_CLASS (self)->set_child_func (self, child, instruction); 
    50         return; 
    51 } 
    52  
    5346static void  
    5447tmut_shell_window_set_child_default (TMutShellWindow *self, TMutShellChild *child, const gchar *instruction) 
     
    7568} 
    7669 
    77 static void  
    78 on_back_clicked (GtkButton *button, gpointer user_data) 
    79 
    80         TMutShellWindowPriv *priv = TMUT_SHELL_WINDOW_GET_PRIVATE (user_data); 
     70 
     71static void 
     72tmut_shell_window_back_default (TMutShellWindow *self) 
     73
     74        TMutShellWindowPriv *priv = TMUT_SHELL_WINDOW_GET_PRIVATE (self); 
    8175        GList *first = NULL; 
    8276        gint cnt = g_list_length (priv->childs); 
     
    9791 
    9892        } 
    99  
     93
     94 
     95static void  
     96on_back_clicked (GtkButton *button, gpointer user_data) 
     97
     98        tmut_shell_window_back ((TMutShellWindow *) user_data); 
    10099        return; 
    101100} 
     
    116115} 
    117116 
    118 GtkProgress*  
    119 tmut_shell_window_get_progress (TMutShellWindow *self) 
    120 { 
    121         return TMUT_SHELL_WINDOW_GET_CLASS (self)->get_progress_func (self); 
    122 } 
    123117 
    124118static GtkProgress*  
     
    171165} 
    172166 
     167GtkProgress*  
     168tmut_shell_window_get_progress (TMutShellWindow *self) 
     169{ 
     170        return TMUT_SHELL_WINDOW_GET_CLASS (self)->get_progress_func (self); 
     171} 
     172 
     173void  
     174tmut_shell_window_back (TMutShellWindow *self) 
     175{ 
     176        TMUT_SHELL_WINDOW_GET_CLASS (self)->back_func (self); 
     177        return; 
     178} 
     179 
     180void  
     181tmut_shell_window_set_child (TMutShellWindow *self, TMutShellChild *child, const gchar *instruction) 
     182{ 
     183        TMUT_SHELL_WINDOW_GET_CLASS (self)->set_child_func (self, child, instruction); 
     184        return; 
     185} 
     186 
    173187static void 
    174188tmut_shell_window_instance_init (GTypeInstance *instance, gpointer g_class) 
     
    214228        object_class = (GObjectClass*) class; 
    215229 
     230        class->back_func = tmut_shell_window_back_default; 
    216231        class->set_child_func = tmut_shell_window_set_child_default; 
    217232        class->get_progress_func = tmut_shell_window_get_progress_default; 
  • trunk/src/tmut-shell-window.h

    r19 r25  
    5454 
    5555        void (*set_child_func) (TMutShellWindow *self, TMutShellChild *child, const gchar *instruction); 
     56        void (*back_func) (TMutShellWindow *self); 
    5657        GtkProgress* (*get_progress_func) (TMutShellWindow *self); 
    5758 
     
    6869TMutShellWindow* tmut_shell_window_new (void); 
    6970 
     71void tmut_shell_window_back (TMutShellWindow *self); 
    7072void tmut_shell_window_set_child (TMutShellWindow *self, TMutShellChild *child, const gchar *instruction); 
    7173GtkProgress* tmut_shell_window_get_progress (TMutShellWindow *self);