r46 - unstable/rutilt/debian/patches

benh at alioth.debian.org benh at alioth.debian.org
Sun Oct 7 23:44:54 UTC 2007


Author: benh
Date: 2007-10-07 23:44:54 +0000 (Sun, 07 Oct 2007)
New Revision: 46

Added:
   unstable/rutilt/debian/patches/014_make_dialogs_transient.diff
Modified:
   unstable/rutilt/debian/patches/series
Log:
Made all dialogs transient for the main window.


Added: unstable/rutilt/debian/patches/014_make_dialogs_transient.diff
===================================================================
--- unstable/rutilt/debian/patches/014_make_dialogs_transient.diff	                        (rev 0)
+++ unstable/rutilt/debian/patches/014_make_dialogs_transient.diff	2007-10-07 23:44:54 UTC (rev 46)
@@ -0,0 +1,463 @@
+--- rutilt.orig/lib/src/GtkGUI.cxx
++++ rutilt/lib/src/GtkGUI.cxx
+@@ -141,7 +141,8 @@
+ 
+ 
+     int SelectInterface
+-                    (const std::vector<nsWireless::CDeviceInfo>& DevicesVec)
++                    (::GtkWindow* pMainWindow,
++                     const std::vector<nsWireless::CDeviceInfo>& DevicesVec)
+                                                 throw (nsErrors::CException)
+     {
+         ::GtkWidget* const pDialog (::gtk_dialog_new_with_buttons (
+@@ -154,6 +155,9 @@
+                                                     0));
+         ::gtk_window_set_resizable (GTK_WINDOW (pDialog), false);
+         ::gtk_dialog_set_has_separator (GTK_DIALOG (pDialog), false);
++        if (pMainWindow)
++            ::gtk_window_set_transient_for (GTK_WINDOW (pDialog),
++                                            GTK_WINDOW (pMainWindow));
+         ::gtk_container_set_border_width (GTK_CONTAINER (pDialog), 6);
+         ::gtk_container_add (GTK_CONTAINER (GTK_DIALOG (pDialog)->vbox),
+                              ::gtk_label_new ("Select the interface to use"
+@@ -871,7 +875,9 @@
+     if (IfaceName.empty())
+     {
+         if (DevicesVec.size() > 1 || m_pModule.get())
+-            Pos = SelectInterface (DevicesVec);
++            Pos = SelectInterface (GTK_WIDGET_VISIBLE (GTK_WIDGET (m_pWindow))
++                                   ? m_pWindow : 0,
++                                   DevicesVec);
+     }
+     else
+     {
+@@ -969,7 +975,8 @@
+             IsCurrentCell = true;
+     }
+     catch (const nsErrors::CSystemExc& Exc) {} // Ignored.
+-    const nsUserData::CProfile* const pProfile (m_pModule->NewProfile (Cell));
++    const nsUserData::CProfile* const pProfile
++                                     (m_pModule->NewProfile (m_pWindow, Cell));
+     if (pProfile) // The user may change his mind and "cancel".
+     {
+         m_ProfileTab.AddProfile (*pProfile);
+--- rutilt.orig/include/CWE17Module.h
++++ rutilt/include/CWE17Module.h
+@@ -65,9 +65,10 @@
+         ~CWE17Module () throw();
+         nsWireless::IDriver& GetDriver () throw();
+         const nsWireless::IDriver& GetDriver () const throw();
+-        nsUserData::CProfile* NewProfile () throw();
+-        nsUserData::CProfile* NewProfile (const nsWireless::CCell&) throw();
+-        bool EditProfile (unsigned) throw();
++        nsUserData::CProfile* NewProfile (::GtkWindow*) throw();
++        nsUserData::CProfile* NewProfile
++                              (::GtkWindow*, const nsWireless::CCell&) throw();
++        bool EditProfile (::GtkWindow*, unsigned) throw();
+         void DeleteProfile (unsigned) throw();
+         void ApplyProfile (unsigned) throw (nsErrors::CSystemExc);
+         /** \warning No bound check! */
+@@ -81,7 +82,7 @@
+ 
+ 
+       protected :
+-        nsUserData::CProfile* EditNewProfile () throw();
++        nsUserData::CProfile* EditNewProfile (::GtkWindow*) throw();
+         static const char* const NewProfileDefaultName;
+ 
+ 
+--- rutilt.orig/include/Module.h
++++ rutilt/include/Module.h
+@@ -73,10 +73,10 @@
+         virtual ~IModule () throw() {}
+         virtual nsWireless::IDriver& GetDriver () throw() = 0;
+         virtual const nsWireless::IDriver& GetDriver () const throw() = 0;
+-        virtual nsUserData::CProfile* NewProfile () throw() = 0;
+-        virtual nsUserData::CProfile* NewProfile (const nsWireless::CCell&)
+-                                                                throw() = 0;
+-        virtual bool EditProfile (unsigned) throw() = 0;
++        virtual nsUserData::CProfile* NewProfile (::GtkWindow*) throw() = 0;
++        virtual nsUserData::CProfile* NewProfile
++                          (::GtkWindow*, const nsWireless::CCell&) throw() = 0;
++        virtual bool EditProfile (::GtkWindow*, unsigned) throw() = 0;
+         virtual void DeleteProfile (unsigned) throw() = 0;
+         virtual void ApplyProfile (unsigned) throw (nsErrors::CSystemExc) = 0;
+         virtual nsUserData::CProfile& GetProfile (unsigned) throw() = 0;
+--- rutilt.orig/include/ProfileEditor.h
++++ rutilt/include/ProfileEditor.h
+@@ -23,6 +23,8 @@
+ 
+ #include <memory> // auto_ptr<>
+ 
++#include <gtk/gtkwindow.h>
++
+ 
+ 
+ namespace nsUserData {class CProfile;}
+@@ -44,7 +46,7 @@
+         ~CProfileEditor () throw();
+         nsGUI::CConfigDialog* GetDialog () throw();
+         const nsGUI::CConfigDialog* GetDialog () const throw();
+-        bool Edit (nsUserData::CProfile&) throw();
++        bool Edit (::GtkWindow*, nsUserData::CProfile&) throw();
+ 
+ 
+       private :
+--- rutilt.orig/include/RTModules.h
++++ rutilt/include/RTModules.h
+@@ -102,9 +102,10 @@
+         void BecomeRoot () throw (nsErrors::CException, std::bad_alloc);
+         nsWireless::IDriver& GetDriver () throw();
+         const nsWireless::IDriver& GetDriver () const throw();
+-        nsUserData::CProfile* NewProfile () throw();
+-        nsUserData::CProfile* NewProfile (const nsWireless::CCell&) throw();
+-        bool EditProfile (unsigned) throw();
++        nsUserData::CProfile* NewProfile (::GtkWindow*) throw();
++        nsUserData::CProfile* NewProfile
++                              (::GtkWindow*, const nsWireless::CCell&) throw();
++        bool EditProfile (::GtkWindow*, unsigned) throw();
+         void DeleteProfile (unsigned) throw();
+         void ApplyProfile (unsigned) throw (nsErrors::CSystemExc);
+         nsUserData::CProfile& GetProfile (unsigned) throw();
+@@ -123,7 +124,7 @@
+         CRT2400Module (const CRT2400Module&);
+         CRT2400Module& operator= (const CRT2400Module&);
+ 
+-        nsUserData::CProfile* EditNewProfile () throw();
++        nsUserData::CProfile* EditNewProfile (::GtkWindow*) throw();
+ 
+         std::auto_ptr<nsWireless::CRT2400Driver> m_pDriver;
+         CProfileEditor m_ProfileEditor;
+@@ -167,9 +168,10 @@
+         ~CRTAdvancedModule () throw();
+         nsWireless::IDriver& GetDriver () throw();
+         const nsWireless::IDriver& GetDriver () const throw();
+-        nsUserData::CProfile* NewProfile () throw();
+-        nsUserData::CProfile* NewProfile (const nsWireless::CCell&) throw();
+-        bool EditProfile (unsigned) throw();
++        nsUserData::CProfile* NewProfile (::GtkWindow*) throw();
++        nsUserData::CProfile* NewProfile
++                              (::GtkWindow*, const nsWireless::CCell&) throw();
++        bool EditProfile (::GtkWindow*, unsigned) throw();
+         void DeleteProfile (unsigned) throw();
+         void ApplyProfile (unsigned) throw (nsErrors::CSystemExc);
+         nsUserData::CProfile& GetProfile (unsigned) throw();
+@@ -207,7 +209,7 @@
+         CProfileEditor m_ProfileEditor;
+         nsUserData::CProfilesFile<> m_ProfilesFile;
+ 
+-        nsUserData::CProfile* EditNewProfile () throw();
++        nsUserData::CProfile* EditNewProfile (::GtkWindow*) throw();
+ 
+             // Private tab :
+         ::GtkTable* const m_pTable;
+@@ -332,9 +334,10 @@
+         void BecomeRoot () throw (nsErrors::CException, std::bad_alloc);
+         nsWireless::IDriver& GetDriver () throw();
+         const nsWireless::IDriver& GetDriver () const throw();
+-        nsUserData::CProfile* NewProfile () throw();
+-        nsUserData::CProfile* NewProfile (const nsWireless::CCell&) throw();
+-        bool EditProfile (unsigned) throw();
++        nsUserData::CProfile* NewProfile (::GtkWindow*) throw();
++        nsUserData::CProfile* NewProfile
++                              (::GtkWindow*, const nsWireless::CCell&) throw();
++        bool EditProfile (::GtkWindow*, unsigned) throw();
+         void DeleteProfile (unsigned) throw();
+         void ApplyProfile (unsigned) throw (nsErrors::CSystemExc);
+         nsUserData::CProfile& GetProfile (unsigned) throw();
+@@ -354,7 +357,7 @@
+         CRT2570Module (const CRT2570Module&);
+         CRT2570Module& operator= (const CRT2570Module&);
+ 
+-        nsUserData::CProfile* EditNewProfile () throw();
++        nsUserData::CProfile* EditNewProfile (::GtkWindow*) throw();
+ 
+         std::auto_ptr<nsWireless::CRT2570Driver> m_pDriver;
+         CProfileEditor m_ProfileEditor;
+--- rutilt.orig/include/private/CWE17Module.hxx
++++ rutilt/include/private/CWE17Module.hxx
+@@ -102,25 +102,27 @@
+ inline ::GtkWidget* nsCore::CWE17Module::GetPrivateTab () throw() {return 0;}
+ 
+ 
+-inline nsUserData::CProfile* nsCore::CWE17Module::NewProfile () throw()
++inline nsUserData::CProfile* nsCore::CWE17Module::NewProfile
++                                             (::GtkWindow* pMainWindow) throw()
+ {
+     m_ProfilesFile.NewProfile (NewProfileDefaultName);
+-    return EditNewProfile();
++    return EditNewProfile(pMainWindow);
+ 
+ } // NewProfile()
+ 
+ 
+ inline nsUserData::CProfile* nsCore::CWE17Module::NewProfile
+-                                        (const nsWireless::CCell& Cell) throw()
++              (::GtkWindow* pMainWindow, const nsWireless::CCell& Cell) throw()
+ {
+     m_ProfilesFile.NewProfile (NewProfileDefaultName, Cell);
+-    return EditNewProfile();
++    return EditNewProfile(pMainWindow);
+ 
+ } // NewProfile()
+ 
+ 
+-inline bool nsCore::CWE17Module::EditProfile (unsigned Pos) throw()
++inline bool nsCore::CWE17Module::EditProfile
++                               (::GtkWindow* pMainWindow, unsigned Pos) throw()
+ {
+-    return m_Editor.Edit (m_ProfilesFile [Pos]);
++    return m_Editor.Edit (pMainWindow, m_ProfilesFile [Pos]);
+ 
+ } // EditProfile()
+--- rutilt.orig/include/private/GtkGUI.hxx
++++ rutilt/include/private/GtkGUI.hxx
+@@ -25,7 +25,7 @@
+ 
+ inline const nsUserData::CProfile* nsGUI::CGtkGUI::EditProfile () throw()
+ {
+-    if (m_pModule->EditProfile (m_ProfileTab.GetSelectedRow()))
++    if (m_pModule->EditProfile (m_pWindow, m_ProfileTab.GetSelectedRow()))
+         return &m_pModule->GetProfile (m_ProfileTab.GetSelectedRow());
+     return 0;
+ 
+@@ -43,7 +43,7 @@
+ 
+ inline const nsUserData::CProfile* nsGUI::CGtkGUI::NewProfile () throw()
+ {
+-    return m_pModule->NewProfile();
++    return m_pModule->NewProfile(m_pWindow);
+ 
+ } // NewProfile()
+ 
+--- rutilt.orig/include/private/RTModules.hxx
++++ rutilt/include/private/RTModules.hxx
+@@ -103,26 +103,28 @@
+ inline ::GtkWidget* nsCore::CRT2400Module::GetPrivateTab () throw() {return 0;}
+ 
+ 
+-inline nsUserData::CProfile* nsCore::CRT2400Module::NewProfile () throw()
++inline nsUserData::CProfile* nsCore::CRT2400Module::NewProfile
++                                             (::GtkWindow* pMainWindow) throw()
+ {
+     m_ProfilesFile.NewProfile (NewProfileDefaultName);
+-    return EditNewProfile();
++    return EditNewProfile(pMainWindow);
+ 
+ } // NewProfile()
+ 
+ 
+ inline nsUserData::CProfile* nsCore::CRT2400Module::NewProfile
+-                                        (const nsWireless::CCell& Cell) throw()
++              (::GtkWindow* pMainWindow, const nsWireless::CCell& Cell) throw()
+ {
+     m_ProfilesFile.NewProfile (NewProfileDefaultName, Cell);
+-    return EditNewProfile();
++    return EditNewProfile(pMainWindow);
+ 
+ } // NewProfile()
+ 
+ 
+-inline bool nsCore::CRT2400Module::EditProfile (unsigned Pos) throw()
++inline bool nsCore::CRT2400Module::EditProfile
++                               (::GtkWindow* pMainWindow, unsigned Pos) throw()
+ {
+-    return m_ProfileEditor.Edit (m_ProfilesFile [Pos]);
++    return m_ProfileEditor.Edit (pMainWindow, m_ProfilesFile [Pos]);
+ 
+ } // EditProfile()
+ 
+@@ -176,10 +178,11 @@
+ } // GetDriver()
+ 
+ 
+-inline nsUserData::CProfile* nsCore::CRTAdvancedModule::NewProfile () throw()
++inline nsUserData::CProfile* nsCore::CRTAdvancedModule::NewProfile
++                                             (::GtkWindow* pMainWindow) throw()
+ {
+     m_ProfilesFile.NewProfile (NewProfileDefaultName);
+-    return EditNewProfile();
++    return EditNewProfile(pMainWindow);
+ 
+ } // NewProfile()
+ 
+@@ -200,10 +203,10 @@
+ 
+ 
+ inline nsUserData::CProfile* nsCore::CRTAdvancedModule::NewProfile
+-                                        (const nsWireless::CCell& Cell) throw()
++              (::GtkWindow* pMainWindow, const nsWireless::CCell& Cell) throw()
+ {
+     m_ProfilesFile.NewProfile (NewProfileDefaultName, Cell);
+-    return EditNewProfile();
++    return EditNewProfile(pMainWindow);
+ 
+ } // NewProfile()
+ 
+@@ -226,9 +229,10 @@
+     : CRTAdvancedCLIModule (new nsWireless::CRT73Driver (DeviceName), Path) {}
+ 
+ 
+-inline bool nsCore::CRTAdvancedModule::EditProfile (unsigned Pos) throw()
++inline bool nsCore::CRTAdvancedModule::EditProfile
++                               (::GtkWindow* pMainWindow, unsigned Pos) throw()
+ {
+-    return m_ProfileEditor.Edit (m_ProfilesFile [Pos]);
++    return m_ProfileEditor.Edit (pMainWindow, m_ProfilesFile [Pos]);
+ 
+ } // EditProfile()
+ 
+@@ -461,26 +465,28 @@
+ } // AdhocModeCallBack()
+ 
+ 
+-inline nsUserData::CProfile* nsCore::CRT2570Module::NewProfile () throw()
++inline nsUserData::CProfile* nsCore::CRT2570Module::NewProfile
++                                             (::GtkWindow* pMainWindow) throw()
+ {
+     m_ProfilesFile.NewProfile (NewProfileDefaultName);
+-    return EditNewProfile();
++    return EditNewProfile(pMainWindow);
+ 
+ } // NewProfile()
+ 
+ 
+ inline nsUserData::CProfile* nsCore::CRT2570Module::NewProfile
+-                                        (const nsWireless::CCell& Cell) throw()
++              (::GtkWindow* pMainWindow, const nsWireless::CCell& Cell) throw()
+ {
+     m_ProfilesFile.NewProfile (NewProfileDefaultName, Cell);
+-    return EditNewProfile();
++    return EditNewProfile(pMainWindow);
+ 
+ } // NewProfile()
+ 
+ 
+-inline bool nsCore::CRT2570Module::EditProfile (unsigned Pos) throw()
++inline bool nsCore::CRT2570Module::EditProfile
++                               (::GtkWindow* pMainWindow, unsigned Pos) throw()
+ {
+-    return m_ProfileEditor.Edit (m_ProfilesFile [Pos]);
++    return m_ProfileEditor.Edit (pMainWindow, m_ProfilesFile [Pos]);
+ 
+ } // EditProfile()
+ 
+--- rutilt.orig/lib/src/CWE17Module.cxx
++++ rutilt/lib/src/CWE17Module.cxx
+@@ -114,9 +114,10 @@
+ } // CWE17Module()
+ 
+ 
+-nsUserData::CProfile* nsCore::CWE17Module::EditNewProfile () throw()
++nsUserData::CProfile* nsCore::CWE17Module::EditNewProfile
++                                             (::GtkWindow* pMainWindow) throw()
+ {
+-    if (!m_Editor.Edit (m_ProfilesFile.back()))
++    if (!m_Editor.Edit (pMainWindow, m_ProfilesFile.back()))
+     {
+         m_ProfilesFile.DeleteLastProfile();
+         return 0;
+--- rutilt.orig/lib/src/PrefsPage.cxx
++++ rutilt/lib/src/PrefsPage.cxx
+@@ -126,10 +126,13 @@
+ } // BuildUI()
+ 
+ 
+-void nsGUI::CPrefsPage::AboutButtonClicked (::GtkButton*, CPrefsPage*) throw()
++void nsGUI::CPrefsPage::AboutButtonClicked (::GtkButton*, CPrefsPage* This)
++                                                                        throw()
+ {
+     ::GtkAboutDialog* const m_pAboutDialog (GTK_ABOUT_DIALOG
+                                                 (::gtk_about_dialog_new()));
++    ::gtk_window_set_transient_for (GTK_WINDOW (m_pAboutDialog),
++         GTK_WINDOW (::gtk_widget_get_toplevel (GTK_WIDGET (This->m_pTable))));
+     ::gtk_about_dialog_set_name (m_pAboutDialog, "RutilT");
+     ::gtk_about_dialog_set_version (m_pAboutDialog, "v0.15");
+     ::gtk_about_dialog_set_copyright (m_pAboutDialog,
+--- rutilt.orig/lib/src/ProfileEditor.cxx
++++ rutilt/lib/src/ProfileEditor.cxx
+@@ -28,7 +28,8 @@
+ nsCore::CProfileEditor::~CProfileEditor () throw() {}
+ 
+ 
+-bool nsCore::CProfileEditor::Edit (nsUserData::CProfile& Profile) throw()
++bool nsCore::CProfileEditor::Edit (::GtkWindow* pMainWindow,
++				   nsUserData::CProfile& Profile) throw()
+ {
+     m_pDialog->SetConfigName (Profile.GetName());
+     m_pDialog->SetSSID (Profile.GetSSID());
+@@ -42,7 +43,7 @@
+     m_pDialog->SetIPSetting (Profile.GetIPSettings().GetSetting());
+ 
+     bool IsModified (false);
+-    while (m_pDialog->Run())
++    while (m_pDialog->Run (pMainWindow))
+     {
+         const std::string Name (m_pDialog->GetConfigName());
+         const std::string SSID (m_pDialog->GetSSID());
+--- rutilt.orig/lib/src/RTModules.cxx
++++ rutilt/lib/src/RTModules.cxx
+@@ -244,9 +244,10 @@
+ } // ApplyProfile()
+ 
+ 
+-nsUserData::CProfile* nsCore::CRT2400Module::EditNewProfile () throw()
++nsUserData::CProfile* nsCore::CRT2400Module::EditNewProfile
++                                             (::GtkWindow* pMainWindow) throw()
+ {
+-    if (!m_ProfileEditor.Edit (m_ProfilesFile.back()))
++    if (!m_ProfileEditor.Edit (pMainWindow, m_ProfilesFile.back()))
+     {
+         m_ProfilesFile.DeleteLastProfile();
+         return 0;
+@@ -350,9 +351,10 @@
+ } // CreateCheckButton()
+ 
+ 
+-nsUserData::CProfile* nsCore::CRTAdvancedModule::EditNewProfile () throw()
++nsUserData::CProfile* nsCore::CRTAdvancedModule::EditNewProfile
++                                             (::GtkWindow* pMainWindow) throw()
+ {
+-    if (!m_ProfileEditor.Edit (m_ProfilesFile.back()))
++    if (!m_ProfileEditor.Edit (pMainWindow, m_ProfilesFile.back()))
+     {
+         m_ProfilesFile.DeleteLastProfile();
+         return 0;
+@@ -537,9 +539,10 @@
+ } // ApplyProfile()
+ 
+ 
+-nsUserData::CProfile* nsCore::CRT2570Module::EditNewProfile () throw()
++nsUserData::CProfile* nsCore::CRT2570Module::EditNewProfile
++                                             (::GtkWindow* pMainWindow) throw()
+ {
+-    if (!m_ProfileEditor.Edit (m_ProfilesFile.back()))
++    if (!m_ProfileEditor.Edit (pMainWindow, m_ProfilesFile.back()))
+     {
+         m_ProfilesFile.DeleteLastProfile();
+         return 0;
+--- rutilt.orig/include/WWidgets.h
++++ rutilt/include/WWidgets.h
+@@ -188,7 +188,7 @@
+                                                         throw (std::bad_alloc);
+         virtual ~CConfigDialog () throw();
+ 
+-        bool Run () throw();
++        bool Run (::GtkWindow*) throw();
+         void Hide () throw();
+ 
+         std::string GetConfigName () const throw();
+--- rutilt.orig/include/private/WWidgets.hxx
++++ rutilt/include/private/WWidgets.hxx
+@@ -320,8 +320,10 @@
+ } // SetDefaultKey()
+ 
+ 
+-inline bool nsGUI::CConfigDialog::Run () throw()
++inline bool nsGUI::CConfigDialog::Run (::GtkWindow* pMainWindow) throw()
+ {
++    if (pMainWindow)
++        ::gtk_window_set_transient_for (GTK_WINDOW (m_pDialog), pMainWindow);
+     ::gtk_widget_show_all (m_pDialog->vbox);
+     return ::gtk_dialog_run (m_pDialog) == GTK_RESPONSE_OK;
+ 

Modified: unstable/rutilt/debian/patches/series
===================================================================
--- unstable/rutilt/debian/patches/series	2007-10-07 22:37:48 UTC (rev 45)
+++ unstable/rutilt/debian/patches/series	2007-10-07 23:44:54 UTC (rev 46)
@@ -10,3 +10,4 @@
 002_fix_install.diff
 003_fix_ELF_location.diff
 013_fix_install_failure.diff
+014_make_dialogs_transient.diff




More information about the Pkg-ralink-commits mailing list